import { createRouter, createWebHistory } from 'vue-router';
import HomeView from '../views/HomeView.vue';

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/cate/:cate',
      name: 'subCategory',
      component: () => import('../views/SubCategory.vue'),
    },
    {
      path: '/say',
      name: 'say',
      component: () => import('../views/SayingsView.vue'),
    },
    // {
    //   path: '/say',
    //   name: 'say',
    //   component: () => import('../views/SayingsView.vue')
    // },
    {
      path: '/room',
      name: 'room',
      component: () => import('../views/RoomView.vue'),
    },
    // {
    //   path: '/res',
    //   name: 'resource',
    //   component: () => import('../views/ResourceView.vue')
    // },
    {
      path: '/podcast',
      name: 'podcast',
      component: () => import('../views/PodCastView.vue'),
    },
    {
      path: '/search',
      name: 'search',
      component: () => import('../views/Search.vue'),
    },
    {
      path: '/article/:id',
      name: 'article',
      component: () => import('../views/Article.vue'),
    },
    {
      path: '/discate/:id',
      name: 'discussionCate',
      component: () => import('../views/DiscussionView.vue'),
    },
    {
      path: '/moretopics',
      name: 'moretopics',
      component: () => import('../views/MoreTopics.vue'),
    },
    {
      path: '/myFavArticle',
      name: 'myFavArticle',
      component: () => import('../views/MyFavArticle.vue'),
    },
    {
      path: '/personalCenter',
      name: 'personalCenter',
      component: () => import('../views/PersonalCenter.vue'),
    },
  ],
});

export default router;
